playMaker

Author Topic: A Rect Field that can contain X,Z instead of X,Y?  (Read 3310 times)

mweyna

  • Full Member
  • ***
  • Posts: 242
A Rect Field that can contain X,Z instead of X,Y?
« on: July 02, 2013, 01:18:46 AM »
So I'm trying to solve a problem that requires the creation of a Rect Field. However, my game world is X,Z rather then X,Y (Was this tool intended just for 2d Side Scrollers?). Any idea how to have it be an X,Z instead or perhaps another action that does that function?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15620
  • Official Playmaker Support
Re: A Rect Field that can contain X,Z instead of X,Y?
« Reply #1 on: July 02, 2013, 02:24:51 AM »
Hi,

 A Rect is an abstract representaion of a rectangle, you make up what ever you want out of the values. It doesn't belong to the XY plane, rather it uses a common naming convention to ring bells as you work with it. but basically, you can store in the "y" your z position, that's completly fine.

So for example, you have your vector (10,0,20) which is you start point in your game, inject 10 in rect.x and 20 in rect.z, that's completly fine.

Bye,

 Jean


mweyna

  • Full Member
  • ***
  • Posts: 242
Re: A Rect Field that can contain X,Z instead of X,Y?
« Reply #2 on: July 02, 2013, 03:48:52 AM »
So trying to use the built in Rect functions within Playmaker, under the RECT header, I tried setting my Z to my Y axis, however rather then find elements next to it on the Z axis, it would look up (on the Y axis). So the variable was still getting set to rect.y if I'm reading the script of that action properly. My attempts to tweak the playmaker action script by simply renaming Y to Z didn't take. Any thoughts?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15620
  • Official Playmaker Support
Re: A Rect Field that can contain X,Z instead of X,Y?
« Reply #3 on: July 02, 2013, 05:31:14 AM »
Hi,

 Don't bother trying to edit the action script.

 for example:

 create two floats, "rect x" and "rect y", before you use a rect action, inject your values in these two variables, that is the z component of your vector3 into "rect y" for example, then for the y value under the rect properties select "rect y"

does that make sense?

bye,

 Jean