| 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 checking on many object; How can you use collision checking on many objects | |
|---|---|
| Tweet Topic Started: Nov 12 2010, 10:05 PM (372 Views) | |
| beniboy | Nov 12 2010, 10:05 PM Post #1 |
|
This user has left
![]() ![]() ![]() ![]() ![]() ![]()
|
I am trying to work with ultimate 3D by editting the tech demo. But i have a problem: I tried to apply collision checking with bounding boxses to make the trees solid. But when i did that I got less then 1 fps... Is there a way to apply fast collision checking with many objects?? |
![]() |
|
| Despellanion | Nov 12 2010, 10:13 PM Post #2 |
|
Forum God
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I suggest avoiding collision checks for objects in high numbers such as trees, it's a waste of frame rate and an unnecessary feature. |
![]() |
|
| beniboy | Nov 13 2010, 12:03 AM Post #3 |
|
This user has left
![]() ![]() ![]() ![]() ![]() ![]()
|
And what if I realy want to do this? |
![]() |
|
| Despellanion | Nov 13 2010, 12:18 AM Post #4 |
|
Forum God
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Well you could replace the collision checks from directly on the tree model to simple collision checks on invisible boxes at the trees' positions, to decrease the computing time. And there's also no need to collision check the trees' crown, unless your player can fly. I'm sure there are several other options.
Edited by Despellanion, Nov 13 2010, 12:19 AM.
|
![]() |
|
| beniboy | Nov 13 2010, 12:31 AM Post #5 |
|
This user has left
![]() ![]() ![]() ![]() ![]() ![]()
|
I added a helicopter...
Well... I tried invisible bounding boxes, but that was also WAY to slow Edited by beniboy, Nov 13 2010, 12:32 AM.
|
![]() |
|
| DJ-Habana | Nov 13 2010, 09:25 AM Post #6 |
|
C# King
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
You can let a tree create his bounding box when the player is near and when he is far then delete the bounding box, that's what I do and it works like a bomb for example pseudo code if distance to character is less than 10 and bounding box doesn't exist then create bounding box if distance to character is more than 10 and bounding box exist then delete bounding box |
|
| |
![]() |
|
| hepolite | Nov 13 2010, 03:33 PM Post #7 |
|
Advanced Member
![]() ![]() ![]() ![]() ![]()
|
I have solved this by putting all of my trees in lists, and depending on where the player is, hide/show the trees. The trees also have a small collision cone made out of three triangles which matches the tree's sizes and will be moved out of the collision room if the trees are no longer visible. This is the fastest way I could think of, and the game does run at a decent speed even with a vegetation count of more than 1,000 trees and bushes in the view + the entire level.
Edited by hepolite, Nov 13 2010, 03:42 PM.
|
![]() |
|
| Naz | Nov 13 2010, 07:01 PM Post #8 |
![]()
Forum Leader
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
BRAVO!
|
| May 20th, 2016 | |
![]() |
|
| beniboy | Nov 29 2010, 11:07 PM Post #9 |
|
This user has left
![]() ![]() ![]() ![]() ![]() ![]()
|
i now use this code in the step event of the player:
this code in the create event of the forest bounding box:
and this code in the step event of the forest bounding box:
And it works!!! |
![]() |
|
| « Previous Topic · Questions about Ultimate 3D · Next Topic » |





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




9:12 PM Jul 11