Jump to content
Barba-negra

setVectorDir with slow speed

Recommended Posts

Hello guys, greetings to all, I am trying to rotate an object but slowly, but the function setVectorDir does it immediately, will there be a way to do the slow rotation? thanks to everyone

 

 

Share this post


Link to post
Share on other sites

Do it incrementally, say once per frame.

 

Pseudocode: 

dir = 0

step = 1

On each frame

  dir = dir + step

  object setDir dir

 

This is of course simplified. Since your working with setVectorDir the exact math depends on how you want rotate it. 

 

For a 2D rotation around the Z-axis it is easier to use setDir with BIS_fnc_setPitchBank instead. 

 

If you want full 3D rotation look into Axis-angle rotations but beware that working with 3D vectors can be tricky. 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×