News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > Coding

Reply
 
Thread Tools Display Modes
Old 20th May 2004, 03:52 PM   #1
aardvarkk
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?
aardvarkk is offline   Reply With Quote
Old 21st May 2004, 12:19 AM   #2
TG|Mcbain
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.
TG|Mcbain is offline   Reply With Quote
Old 21st May 2004, 12:47 AM   #3
jimboh
Salty Sea Dog
 
jimboh's Avatar
 
Join Date: Jan. 20th, 2004
Location: Roaming the high seas...
Posts: 140
What kind of actor is this? If its some actor which uses native code, that may be your problem...
jimboh is offline   Reply With Quote
Old 21st May 2004, 08:21 AM   #4
aardvarkk
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?
aardvarkk is offline   Reply With Quote
Old 21st May 2004, 08:32 AM   #5
aardvarkk
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?
aardvarkk is offline   Reply With Quote
Old 21st May 2004, 11:55 PM   #6
jimboh
Salty Sea Dog
 
jimboh's Avatar
 
Join Date: Jan. 20th, 2004
Location: Roaming the high seas...
Posts: 140
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
jimboh is offline   Reply With Quote
Old 23rd May 2004, 06:12 PM   #7
[SAS]Solid Snake
Registered User
 
[SAS]Solid Snake's Avatar
 
Join Date: Jun. 7th, 2002
Location: New Zealand
Posts: 2,633
Quote:
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.

Quote:
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.
__________________
I make the impossible possible ... ... ... to some extent.

Digital Confectioners
[SAS]Solid Snake is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 11:11 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer