Collisions and Blocking Mishaps

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

aardvarkk

New Member
May 7, 2004
64
0
0
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?
 

TG|Mcbain

New Member
Apr 22, 2004
10
0
0
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.
 

aardvarkk

New Member
May 7, 2004
64
0
0
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?
 

aardvarkk

New Member
May 7, 2004
64
0
0
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?
 

jimboh

Salty Sea Dog
Jan 20, 2004
140
0
0
Roaming the high seas...
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
 

[SAS]Solid Snake

New Member
Jun 7, 2002
2,633
0
0
40
New Zealand
www.digitalconfectioners.com
For one, it is a native class
No, this has nothing to do with his problem. Think about it, the base classes are all native as well. All base classes have a certain nativity about them. Native function don't just run in the background for no reason, they have more to do with the fact that somethings just aren't possible in Unrealscript such as having non-restrictive access to outside files, so DLL's are created which are linked through Unrealscript by using native. This allows much easier module like creation for people working with the Unreal engine.

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.

bNoDelete
This won't allow dynamic spawning of an object, however it will allow you to place the actor inside UnrealED. It will let you there, but once your in the game, it can't be destroyed, hence it's label of that boolean.

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.