![]() |
|
|
#1 |
|
Registered User
Join Date: May. 7th, 2004
Posts: 64
|
Collisions and Blocking Mishaps
Running into some strange issues and was hoping somebody could clear them up...
I'm spawning some objects in a level, and i've made sure to turn off bCollideWorld and bCollideWhenPlacing. The objects will spawn properly, but it seems like as soon as they hit a BSP, they get destroyed (or just disappear). I'm not yet certain it's the brush that is the problem... The objects will probably encounter other actors on their travels, and I started to get confused about whom I should be setting collide and block properties for. i.e. - What happens when a blocking actor hits a non-blocking actor? - What happens when a colliding actor hits a non-colliding actor? I'm not sure exactly why my object is being destroyed, but I thought maybe it had something to do with the fact that it's hitting a brush? I read something on the Wiki about collisions only being calculated for certain BSP Trees, and maybe this has something to do with why my object is disappearing? |
|
|
|
|
|
#2 |
|
Registered User
Join Date: Apr. 22nd, 2004
Posts: 9
|
Actors witcth are "out of the world" are destroyed (exept static meshes and controllers i belive) and as you've set bcollideWorld to false your actor is "leaving the world" as soon as it collide with BSP object.
|
|
|
|
|
|
#3 |
|
What kind of actor is this? If its some actor which uses native code, that may be your problem...
|
|
|
|
|
|
|
#4 |
|
Registered User
Join Date: May. 7th, 2004
Posts: 64
|
The actor is one that I've created called "Item" and it extends StaticMeshActor. Is there any way to make the Item not be destroyed when it "leaves the world"? I couldn't find anything in the Wiki about what conditions must apply for an object to be destroyed automatically. I found the sequence of events upon destruction, and garbage collection talked a bit about removing items when there are no more references to it and its pointers have all been destroyed.
I thought I could solve the problem by setting bNoDelete to True, but now the objects won't spawn (I guess you can't have objects non-static and non-deleteable too?). Any advice? |
|
|
|
|
|
#5 |
|
Registered User
Join Date: May. 7th, 2004
Posts: 64
|
I just tried filling an array with the objects I'm spawning, in hopes that maybe by having active references to the objects they wouldn't be destroyed. No dice! Is there any way I can keep these objects from being destroyed, and why exactly ARE they being destroyed?
|
|
|
|
|
|
#6 |
|
uhh...I would avoid using StaticMesh Actor, and just use the base class Actor. For one, it is a native class, so some quirks may be hiding in the background that you may not know about, and in the long run, using the Actor class would be more flexible and easier.
-Jimboh |
|
|
|
|
|
|
#7 | ||
|
Quote:
Again, TG|McBain correctly identified that once an object leaves the world space they are destroyed. I don't think there is a way to stop this from happening. Quote:
A possible fix to this, is to actually test to see if the new location is possible or not. By doing this you prevent the actor from leaving the game world. To do this, use a trace, and detect if the trace actually hits something. If it hits the world or other objects it will return with a value. If this value is equal to something then move the actor to the new location since it is possible. To find code for this, I believe the player's behindview camera checks for such things. Ideally if you could use fast trace that would be much better. |
|||
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|