playMaker

Author Topic: Smooth rotate while moving simultaniously?  (Read 1732 times)

FritsLyn

  • Full Member
  • ***
  • Posts: 191
Smooth rotate while moving simultaniously?
« on: June 09, 2013, 06:34:34 AM »
Example:

A little bus, I Translate it x:0 y:0 z:1 every frame. It is moving forward.

Target for the bus is somewhere in the scene, no obstacles.

I want to ROTATE the bus SLOWLY towards the target WHILE MOVING forward.

How?

***

Background:

I think I have tried everything by now (I hope I have not, and that you can help ;)

Using iTweens, all kinds of "look at" stops the bus from moving while turning.
Using a trillion combinations of vector3 rotate, strange math for angles and children to the bus with instant LookAt to compare and divide values for slow rotation..

I just cannot get it to work :)

All I want is one way or the other to move the whole object forward, while slowly rotating the whole object towards a given target.

Thanks :)
« Last Edit: June 09, 2013, 06:42:51 AM by FritsLyn »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Smooth rotate while moving simultaniously?
« Reply #1 on: June 10, 2013, 02:46:29 AM »
Hi,

 that is going to be tricky I feel.

 Have you studied pathfinding solutions? they will likely give you everything you need.

bye,

 Jean