3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1]

Author Topic: 13 year old needs help with imposters please  (Read 387 times)

« on: January 13, 2014, 11:23:52 AM »
hi name is malik am 13 years old   i am try remake a game in 3drad my grandmother play me with cards and will need use skinmes imposters of around 25 can help please if can detect if is any overlaping imposters may be using distance close to make 2 touchin impostr removed i know this alot to ask to show script for me would be very thankyou for help sorry my bad english as not first linguage

malik
« Reply #1 on: January 14, 2014, 08:45:14 AM »
the easiest way to do this would be to use a  method which would loop around and compare the location of the centers of each card with all the others...  if any are with a certain distance, they within the
circular overlap and assumed to be touching...


this is not a perfect solution as most playing cards are not round, but you can make it work with a lil planning...


--Mike
« Last Edit: January 14, 2014, 02:08:32 PM by Mike Hense »
« Reply #2 on: January 14, 2014, 10:50:56 AM »
mike, i understand principle that i use iObjectImposterGet to et locations of imposters but i not sure how to compare the vector3 locations against each other in a circle loop, is there an example or any small code demo i could examine to understand the workings, i really dont like ask too much help but would help me learn by seing example if not take too much your time i thank you much i search for anything like i need but cant find example thank you
« Reply #3 on: January 15, 2014, 11:43:37 AM »
i having problem with this i upload example  i trying to compare the vectors of the 3 imposters to see if any are overlap and if so then start particles i cant seem to get the right thing to put into the ivectorcompare for vector1 and 2 but then how i compare the 3rd imposter i trying but just wont work for me please can a kind person give me a little help with this script thank you much
« Reply #4 on: January 15, 2014, 12:48:32 PM »
might be get somewhere but can check for me i using part of mike tree script but i am only seem to check the last id against the next imposter id in the loop how do check each id against each other in a loop im trying but struggling and could do with some expert help a bit thank you
« Reply #5 on: January 15, 2014, 02:20:21 PM »
1 - get the locations and place em in an array of Vector3s (if the cards are moving you'll have to do this continuously)

2 - loop around and compare the distances between each one... that can be done easily in 3DRAD using 
distance = iVectorLength(Vector3A - Vector3B)...

if the distance is less than whatever arbitrary distance you decide on, then do something (like moving em farther apart or something)...


--Mike
« Reply #6 on: January 16, 2014, 06:56:43 AM »
Mike am i getting anywhere as i feel i get to end of my ability in this i just cant get my head around it it looks so simple how you explain but i feel so stupid that i cant work it out, i try to use this example of the 3 balls to check if any are close to each other in the threshold i think his beyond me im so idiot thanks your help i dont want to give up
« Reply #7 on: January 16, 2014, 11:50:26 AM »
can someone please help me with script i just staring at this and dont know what to do anymore it only checkes imposter id 1 against id 2 i dont understand how to check them all against eachothers location in a loop now driving me mad if i could see the code work i could understand how it works be grateful for help giving me clues is not helping i just cant get it work if any coder can help with small script for more than 2 imposter check eachother position i cant get 2 array loop together
« Reply #8 on: January 17, 2014, 11:36:37 AM »
Mike i dont get what to put as second vector in the ivectorlength because all imposters will have the same vector name as in my example they are location so how can ivectorlength be location-location this must be easy but i dont get how to make the locations for the imposters have difrent names to compare them i can see its easy using seperate object like rigidbody as they can have difrent location name but how with imposter am i really this stupid i am really getting confused please
« Reply #9 on: January 22, 2014, 12:33:48 PM »
Mike thanks for your help and tips i have now worked out after many days and attempts i was making too complicated in my code but seems so simple now i finally get it to working
Pages: [1]