playMaker

Author Topic: Snap to Object + Plus or Minus a distance in X,Y,Z ?  (Read 1503 times)

Omninorm

  • Playmaker Newbie
  • *
  • Posts: 33
Snap to Object + Plus or Minus a distance in X,Y,Z ?
« on: October 19, 2016, 08:10:06 AM »
Hi,

I'm trying to make a cover system for my top down / isometric game (3D) kinda like Gears of War but simpler.
So far I've got it almost sorted. My player runs and if close enough dives into cover  Character snaps ontop of the object I am trying to get cover behind.

Long story short I move to the object using iTween when the cover event is kicked off to the detected object.
This issue of jumping to the top of the cover is obviously caused by the iTween moving to the Origin point of the object and then the collision box gets in the way and the Vector 3 Y position moves it to the top and there the character stands.

Is there a way I can have a VectorPosition + or - certain X and Y values?
i.e Set Vectorposition to Variable + 4,0,0  ?
I hope I'm making sense.

I could move the origin to the edge but that then will only work properly from one side and cause other issues with parts of my game.
 
The only other thing I can think of is to create blank objects and add them as children on each side that is snappable but thats really not a good way of doing it.

Im very new to playmaker really and maybe I'm missing something obvious.
I did go through totorials on Hutonggames Youtube channel etc but could not really find anything of help in my particular case.


Omninorm

  • Playmaker Newbie
  • *
  • Posts: 33
Re: Snap to Object + Plus or Minus a distance in X,Y,Z ?
« Reply #1 on: November 01, 2016, 09:06:17 AM »
Sorted it out.