Adjustable game area

Nov 14, 2011 at 8:53 AM
Edited Nov 14, 2011 at 8:56 AM

hi ohan I am trying to make my game are adjustable.

i ask the user to put the groundmarker then I keep it's worldtransformation.

img src="http://i.imgur.com/Nk29i.png

then user removes the groundmarker, and using the toolbarmarker sets the game area.

the problem is, it is not always level.

http://i.imgur.com/Z42bm.png

http://i.imgur.com/GqG73.png

also the box moves up or down instead of size increasing in y axis. the x axis works fine. though.so the problem is that when i move the toolbar marker further away from camera the red box moves up instead of sticking on the ground.

here is a video

http://tinypic.com/r/33wvdj8/5

here is how i do it

 if (MaxX < setupMarkerNode.WorldTransformation.M41)        //setupMarkerNode is the small toolbarMarker           

MaxX = (int)setupMarkerNode.WorldTransformation.M41;               

if (MinX > setupMarkerNode.WorldTransformation.M41)                   

MinX = (int)setupMarkerNode.WorldTransformation.M41;               

if (MaxY < setupMarkerNode.WorldTransformation.M42)                   

MaxY = (int)setupMarkerNode.WorldTransformation.M42;               

if (MinY > setupMarkerNode.WorldTransformation.M42)                   

MinY = (int)setupMarkerNode.WorldTransformation.M42;

 

Matrix mat = groundNodeTransformation;  //groundNodeTransformation is groundMarkerNode.Worldtransformation which is saved when space is pressed

mat.M41 = (MaxX + MinX)/2;                 

mat.M42 = (MaxY + MinY)/2;

boxNode.Model = new Box((MaxX - MinX), (MaxY - MinY), 2);  //boxNode is the red box

boxTransNode.WorldTransformation = mat;

 

do you have any suggestions to do this better. i am basically trying to do what these guys are doing btw 0:08 - 0:30 (without the height, for now)

http://www.youtube.com/watch?v=vrB27YPE8nI

 

thanks for your help.

Nov 22, 2011 at 9:00 PM

do you have any advice? i would really appreciate. 

Coordinator
Nov 22, 2011 at 9:31 PM

I don't have much time now, so I can only respond to those posts that I have answer right away without thinking or looking into details.

Ohan

Dec 4, 2011 at 9:16 AM

if you get anytime later, please have a look. 

we are using goblin for our senior design project, and i would really appreciate your help.

thanks.