Problem with actuator [editobject (add object)]

Hello, i’m trying to spawn a bullet (a nuclear warhead) in my player, using an Empty and Add-object actuator, but for some reason the scale of my object (the bullet) changes completely when spawned (attached images).




Is there any way to spawn my object in the original scale? (i dont want to make it look like a baseball bat xD).

̶S̶r̶y̶ ̶a̶b̶o̶u̶t̶ ̶t̶h̶i̶s̶ ̶b̶a̶d̶ ̶e̶n̶g̶l̶i̶s̶h̶

select bullet, hit ctrl+s and apply scale.
or select t, hit alt +s to get origional size back, then head into edit mode(tab) and scale it there.

so apply the scale, or get used to scale objects in edit mode. unless you make a scaling animation out of it.

Ctrl + S is quick save, and T is the side menu…

I tried Alt + S and fix object’s scale in edit mode, but problem continues

I did not add any animation on the plane, in the empty or the bullet… I simply added the sensors and actuators, and the physics.

I realized now, the problem only happens when I parent the Empty + Plane.

But how to make the bullet always be thrown from the plane (in movement), without using the parent between the launcher (empty) and the plane? :confused:

Edit: Ctrl+P > Keep transform dont fix the problem too…

Ctrl + A: Apply scale on the empty maybe…

When you spawn an object relative to another one, the spawned object will copy the location, the rotation and the scaling.

So if your warhead is scaled weird, its because something in your children/parent hierarchy is scaled weird. Look for that.

Crtl + A on Bullet and empty and everything. It’s better if everything is scaled to [1.0, 1.0, 1.0]

This not solve, I was sure Ctrl + A would work, but i dont know why it does not change anything…

https://media.giphy.com/media/3ov9jJf3NmIS5V3w0E/giphy.gif

The “child” only scales when added by the object’s menu
does not seem to change anything when it is added by Ctrl + P.

And even using Ctrl + A > scale, the problem continues in every way…

Was to be something so simple: Select “parent” object, select “child”, Ctrl + P > done. But it is not.

oops sorry ctrl+a on the bullet-> apply scale, should work.
else alt+s to restore the size, and then scale it in edit mode.

Oh ok xD

ctrl + a -> Scale, does not change anything… :x

What is the correct way to parent objects?
There are 3 ways, and for me the 3 are completely different, but with the same problem.


Thank you all for trying to help.

select the child, then the parent then ctrl+p > set parent to ‘object’.
if you have already lined up where you want your object to be us ctrl+p > set parent to ‘object’ (keep transform).

I think you should get rid of that set parent block…there is probably no need for that logic brick and it could be messing with it in some unknown way.

this is almost certainly a scale problem…like said above apply scale on all objects. ctrl+a > apply scale…I would gladly look at your file and fix it if you upload it…or tell you exactly the problem. Most of these guys have been using BGE far longer than I for them, this is a easy fix…

I tried all possible “parents”, ctrl + p was my first attempt, they all have the same problem.

the steps I follow to do this:
I created the bullet on a different layer
I added physics to that bullet, and I put it to go always in one direction
I created an Empty
I added a keyboard in this Empty to add the bullet

I selected the Empty, then the plane, and clicked ctrl + p -> keep transform

Did I do something wrong? I do not think so… :no:

The problem only happens if the empty is child of the airplane (or grandchild).So it is not an object (bullet) scale problem

Here is a video showing the problem

So if your warhead is scaled weird, its because something in your children/parent hierarchy is scaled weird. Look for that.

When I speak about hierarchy, it implies all ancestors.

My guess is that in order to modelize your plane, you started from a cube and scaled it to fit the rough shape.
Ctrl + A on the aircraft.

Ohh lol, this solved!

:smiley:

I have no idea how many projects I have already abandoned because of this “problem”

Thank you all again!

It is not a problem, it’s basically your own fault.

You should always scale/resize objects in edit mode. else the scale factor is off.
Or instead of scaling in edit mode, you always need to press ctrl+a and apply scaling.

the size of empties doen not matter, big or small, it’s scaling factor is not being used.

That’s why I put “problem” in quotes.

But anyway, I will take more care =))

it’s fine, no one starts off knowing all these little things, now you know a bit more and it will help you in this and future projects.

Yep!
Well, i started using BGE 7 years ago xD, but in modeling I’m horrible, so I did not know these commands before.