playMaker

Author Topic: problems with rotating an object depending on surface [SOLVED]  (Read 2108 times)

Muminka

  • Playmaker Newbie
  • *
  • Posts: 5
problems with rotating an object depending on surface [SOLVED]
« on: September 11, 2013, 11:50:54 AM »
Hi guys,

Here is what I try to reach:
I have a butterfly which shall be rotated relative to the surface it sits on.
I used this solution: http://hutonggames.com/playmakerforum/index.php?topic=3510.0
but this does not work properly for my situation as the butterfly looks in the same direction as the surface normal. (If it sits for example on the top of a cube, it looks up in the sky.) Rotating it afterwards, as in another thread was suggested for footsteps also does not work because it can lead to the butterfly lying on it's back in the end.

I think this solution http://answers.unity3d.com/questions/528078/how-do-i-rotate-a-rigidbody-to-a-surface-normal-an.html could fit, but it uses Quaternion.FromToRotation and I could not find an equivalent in playmaker. Did I oversee something or is there perhaps a super easy solution I did not find yet?

Greetings
Muminka
« Last Edit: September 13, 2013, 09:10:02 AM by Muminka »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: problems with rotating an object depending on surface
« Reply #1 on: September 13, 2013, 05:36:46 AM »
Hi,

 have you checked this:

https://hutonggames.fogbugz.com/default.asp?W967

 bye,

 Jean

Muminka

  • Playmaker Newbie
  • *
  • Posts: 5
Re: problems with rotating an object depending on surface
« Reply #2 on: September 13, 2013, 09:09:42 AM »
Oh thank you very much, this was exactly what I needed  ;D