playMaker

Author Topic: angle alignment of moving object[SOLVED]  (Read 2498 times)

Pawel

  • Junior Playmaker
  • **
  • Posts: 93
angle alignment of moving object[SOLVED]
« on: March 26, 2013, 04:33:26 PM »
I am trying to figure out if it is possible with Playmaker to make sure that the object is aligned to a surface angle as it moves along rather then always staying upright.

Attached is a little drawing, just to make sure I am clear...

I know it has to do with normals of the ground surface, but have no idea how to extract and apply this information to moving objects...

I's appreciate any help.
« Last Edit: March 28, 2013, 01:24:08 AM by jeanfabre »

TIGGYsmalls

  • Junior Playmaker
  • **
  • Posts: 80
Re: angle alignment of moving object
« Reply #1 on: March 26, 2013, 04:37:44 PM »
You could have a Raycast firing out of the bottom of your object, that gets the normal of what it hits.

Pawel

  • Junior Playmaker
  • **
  • Posts: 93
Re: angle alignment of moving object
« Reply #2 on: March 26, 2013, 05:55:18 PM »
I've spent hours trying to do just that with no results...  :)

What do I store in a variable? What kind of variable? How do I apply this variable to the moving object to correct the surface allignment?


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: angle alignment of moving object
« Reply #3 on: March 27, 2013, 08:07:02 AM »
Hi,

 I made an example to do just that :

http://hutonggames.com/playmakerforum/index.php?topic=900.msg3781#msg3781

bye,

 Jean


Pawel

  • Junior Playmaker
  • **
  • Posts: 93
Re: angle alignment of moving object
« Reply #4 on: March 27, 2013, 10:25:41 AM »
Jean, thank you so much for this. Your setup is awesome and it helped me a lot!