Cheo
Active member
Hello, what would be the most appropriate way to have a projectile always stay upright with a rotation value of 0, 0, 0 while it is thrown ? I thought setting the Rotation Speed to zero would be enough, but it isn't. When experimenting and trying to comment out various bits of codes, I noticed that by default the demo grenades are perfectly upright for one frame when spawned, then get titled. In addition when we comment out the following line in Trajectory Object.OnEnable() :
The grenade is spanwed in an upright position and doesn't move nor rotate. However when uncommenting it and commenting out the content of Rotate and the two Move voids, it is spawned once again upright for one frame only and then stays static and tilted. I wasn't able to pinpoint the moment when the rotation is applied, but at this point I'm suspecting there's something I'm missing at the SimulationManager level.
I hope this question makes sense and hope you can enlighten me on this, thanks.
C#:
m_SimulationIndex = SimulationManager.RegisterSmoothedObject(this);
The grenade is spanwed in an upright position and doesn't move nor rotate. However when uncommenting it and commenting out the content of Rotate and the two Move voids, it is spawned once again upright for one frame only and then stays static and tilted. I wasn't able to pinpoint the moment when the rotation is applied, but at this point I'm suspecting there's something I'm missing at the SimulationManager level.
I hope this question makes sense and hope you can enlighten me on this, thanks.