Problem with projectile heading


#1

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

https://www.dropbox.com/s/cmkpdgqqjcp2424/Kombat%20-%20bullet%20vector%20TEST.zip?dl=0


#2

Try orienting the projectile to the same local forward direction.


#3

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


#4

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.


#5

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.


Creating a "look at" node set up
#6

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:


Creating a "look at" node set up
#7

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