|
Squat
|
 |
« on: January 20, 2009, 02:33:18 PM » |
|
I'd like a feature to turn off raycasting on objects I want to just use for collision only. Setting an object to invisible hides the collision, but keeps the active script.
I have a relatively nice method of doing it myself and I thought I'd share because it works perfectly. You get stopped physically but can shoot right through.
1. Size an editable stationary box to exactly where you want your invisible wall to be.
2. Set the collision type to Bounding Box.
3. Save the world.
4. Reload the object.
5. Set the collision type to Box.
6. Save the world.
7. Reload the object.
8. Edit Properties on the object.
9. Edit the .OPR as a text file.
10. Comment out everything except the collision.
11. Need to reposition? Uncomment.
I usually keep a spare off to the side that I remove in the end.
|
|
|
|
|
Logged
|
|
|
|
|
Spaz
|
 |
« Reply #1 on: January 22, 2009, 01:18:19 PM » |
|
Cool, Squat. Thanks. 
|
|
|
|
|
Logged
|
|
|
|
|
Architex
|
 |
« Reply #2 on: May 21, 2009, 10:29:09 PM » |
|
OH, Squat, I believe you can just create a stationary box and set the transparency to zero, correct? hahaha, just thought I found a faster way...
|
|
|
|
|
Logged
|
|
|
|
|
Squat
|
 |
« Reply #3 on: May 22, 2009, 01:06:55 PM » |
|
Have you tried that yet and tried to shoot through it? Raycasting still detects the surface even though it's set to transparent. There needs to be no detectable geometry there for the raycast. Hence, just a collision box in place with the object model commented out effectively stops physics and not raycasts...thus a truly invisible wall. Of course, rockets will hit it, LOL! You'll actually need to set up collision groups and tailor the code a bit.
In the end, I'm a bit worried about the feel of the gunplay in GC games. I don't particularly like the raycasting method of shooting. Truthfully, I'm very unhappy with the way the raygun shoots in my demo. It seems to autotarget something. I'm hoping that we can get similar control and performance of games such as Battlefield and Left 4 Dead aswell as some of the weapons in TF2. Rockets and grenades are easy, but getting tracers on physical projectiles and even projectile collision detection is what I haven't seen and the online performance of that makes me nervous.
I guess I'm just anxious to see what the new player character scripts that are being set up for us are gonna do.
|
|
|
|
|
Logged
|
|
|
|
|
gekido
Guest
|
 |
« Reply #4 on: June 19, 2009, 09:23:11 PM » |
|
there are multiple types of raycasting that are available. what it sounds like you are using is GEOM_VISIBLE which casts against the visible geometry of the models in the world, and is the slowest option.
to cast against the collision geometry of objects, simply use GEOM_PHYSICAL instead.
There is also a GEOM_WATER to raycast into water as well, which (on my list) I will eventually be using to add some proper underwater camera manipulating (fog adjustments / blurriness etc) for the character script. you can also use this to raycast down to detect if the character is standing in water to spawn splash effects etc.
|
|
|
|
|
Logged
|
|
|
|
|