Playmaker Forum

Playmaker Help & Tips => Playmaker Help => Topic started by: FritsLyn on August 12, 2015, 05:42:17 AM

Title: Transform.localPosition
Post by: FritsLyn on August 12, 2015, 05:42:17 AM
Hi, the good old

Get Collision Info
https://hutonggames.fogbugz.com/default.asp?W369

is returning world coordinates for Contact Point.

Now I'd like to know in 'Local space' if this is in front or at the rear of my spaceship.

So, in Unity scripting, I'd use
Transform.localPosition
http://docs.unity3d.com/ScriptReference/Transform-localPosition.html

- and I'd think it'd be a walk in the park to just do that in PlayMaker.. but strangely I'm stuck.. (other than I could of course set an empty at the world etc etc - but there must be a simple way?!

I'm sure this is going to be a d'oh!

Hit me :D
Title: Re: Transform.localPosition
Post by: terri on August 12, 2015, 08:33:06 AM
Have you looked at Inverse Transform Point?
Title: Re: Transform.localPosition
Post by: FritsLyn on August 12, 2015, 10:34:12 AM
Have you looked at Inverse Transform Point?

d'oh! :D

Thanks Terri!

(That has got to be the worst PlayMaker lingo ever!)
Title: Re: Transform.localPosition
Post by: terri on August 12, 2015, 11:20:27 AM
Have you looked at Inverse Transform Point?

d'oh! :D

Thanks Terri!

(That has got to be the worst PlayMaker lingo ever!)

np, not playmaker lingo though, it's unity: http://docs.unity3d.com/ScriptReference/Transform.InverseTransformPoint.html
Title: Re: Transform.localPosition
Post by: FritsLyn on August 12, 2015, 11:58:37 AM
Oh wow.. that and Transform.localPosition.. I'm getting dizzy!

But thanks a bunch :)