Problem with projectile heading

I have set up a tank with separate movement for the turret and when I fire a round it travels in the right direction but the bullet has the wrong heading, the link below contains the project and you’ll find notes in a window when opening the blend file for controls, etc.

The armory tank tutorial doesn’t have separate rotation for the turret and the bullets are spherical so it doesn’t matter if they rotate

Try orienting the projectile to the same local forward direction.

Did you look at the .blend file? I’ve tried everything.

The nodes look right, using “look” from transform.
You get a direction you multipy by 20, the problem is setRotation doesn’t seem to work with a direction.

I tried using “Look at” , it needs a start location that is projectile location, and a destination that is projectile location + direction * Vector lenght ( to debug in game i checked destination placing some object and it is working as expected).
Unfortunately something doesn’t work about those nodes :frowning_face:

You can submit an issue on Github.

I got it working using “Set Transform” node, instead of using rotation nodes or LookAt node.

To work you need your projectile model to have it’s origin at 0,0,0.
If projectile orientation is not good, change it’s rotation and apply it with Object > Apply > Rotation

I reported issue LookAt, SetRotation and GetRotation not working on github.

Also playing the game , sometimes physic objects had strange behaviour , like collision while nothing was colliding or some jittering, Armory will need to make physics more stable an reliable.

I hope it helps.

1 Like

Thank you very much, I will take a look at it as soon as I get home from work. I really thought I was doing something wrong, I’m almost glad that it was a bug. :wink:

Working much better now but the physics have got worse in 5.0, thanks again!