| We hope you enjoy your visit. You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you are already a member please log in to your account to access all of our features: |
| Collision Question; Can you have U3D return the ID.... | |
|---|---|
| Tweet Topic Started: Apr 16 2009, 11:25 PM (263 Views) | |
| 13bgarli | Apr 16 2009, 11:25 PM Post #1 |
|
Member
![]() ![]() ![]() ![]()
|
Ok i have a problem, I can't seem to find out how to get U3D to return the ID of the collided Object. this will help alot, i'm trying to incorporate bullets into my game. I got the Collision to work, but i cant seem to get it to return the ID of the Object it collided with. I'm useing U3D 2.1.1 thank you very much |
| |
![]() |
|
| MysteriXYZ | Apr 17 2009, 01:38 PM Post #2 |
|
Master Matrix Masher
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
You'll have to check the collisions within a loop, there's simply no other way. If you have instances of the same object, you can use a with-statement to cycle through all of them. If not, you can store the different instance id's in a ds_list and use a for-loop instead. In case there are multiple instances on the path of the bullet, you will also want to know which of those is hit first. So your code could look like this:
|
| U3D is like candy; after extensive consumption, it's Best to brush. | |
![]() |
|
| 13bgarli | Apr 18 2009, 09:29 PM Post #3 |
|
Member
![]() ![]() ![]() ![]()
|
Wow thankyou very, very, very, very,very, very, very, very,very, very, very, very,very, very, very, very,very, very, very, very,very, very, very, very,very, very, very, very,very, very, very, very, Much XD I'll add you in the credits, i used one of your examples to. ![]() Thanks MysteriXYZ |
| |
![]() |
|
| MysteriXYZ | Apr 19 2009, 09:51 PM Post #4 |
|
Master Matrix Masher
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Yay, I'm gonna be famous. Again .You're power(very,100) welcome .
|
| U3D is like candy; after extensive consumption, it's Best to brush. | |
![]() |
|
| « Previous Topic · Questions about Ultimate 3D · Next Topic » |





![]](http://z1.ifrm.com/static/1/pip_r.png)




.
10:21 AM Jul 11