www.jpct.net
jPCT-AE - a 3d engine for Android => Support => Topic started by: sushobhit on February 14, 2014, 07:53:30 am
-
Hi friends ,
I was working on a project in jpct regarding spaceship sim. And some point in the program I needed to calculate distance beetween two objects. I want a SimpleVector that contains the info of the distance in terms of all the three axis. To be more specific :
SimpleVector distance = Object1.getDistance(Object2); //This should return the simplevector form
is there some function to get this form of distance ?????? Maybe I am overlooking something cause I checked all the parameters of Object3d & SimpleVector Classes but could'nt find any such function ?????
-
Something like this should work:
SimpleVector distVect=obj2.getTransformedCenter().calcSub(obj1.getTransformedCenter());
-
Thanks ,
I got it !!!!!