May 23, 2012, 12:17:13 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Please report any bugs or issues that you might be encountering with the Beta in the Support System so that we can better keep track of any oustanding issues that may come up.

GameCore Support System
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Invisible Walls  (Read 971 times)
Squat
Hero Member
*****
Posts: 592


View Profile
« 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
Full Member
***
Posts: 109


View Profile
« Reply #1 on: January 22, 2009, 01:18:19 PM »

Cool, Squat.  Thanks. Smiley
Logged
Architex
Full Member
***
Posts: 113


View Profile
« 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
Hero Member
*****
Posts: 592


View Profile
« 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
Pages: [1]
  Print  
 
Jump to:  

 
Powered by MySQL Powered by PHP bluBlur Skin © 2006, hbSkins
Powered by SMF 1.1.14 | SMF © 2006-2011, Simple Machines LLC
Valid XHTML 1.0! Valid CSS!