Jump to content

bullets?


cassius
 Share

Recommended Posts

I tried to use the hitbox like suggested here (created a box with the editor tool, applied material "invisible.mat", set collision type "trigger" and "swept collision") and throw towards it a bullet model with collision type Prop, mass 1, swept collision and apply force, but for some reason I haven't any collision logged in my hook (also if I set collision type "prop" to the hitbox it still doesn't react to the bullet). By the way, the model containing the hitbox is stored in the scene, the bullet is of course instantiated at runtime with Model::Load.

 

Is there something more that I need to setup to correctly handle collisions on objects?

?? FRANCESCO CROCETTI ??

http://skaredcreations.com

Link to comment
Share on other sites

..for short range bullets, Ill go with raycasting, as you could assume that bullet goes in straight line trajectory in near instant time..for long range shots, ill use physics or calculated curved path of projectile, where projectile will still use raycasting, every time new position/alignment on calculated curve is updated..

 

Link to comment
Share on other sites

Lot of games use that function without problem ,why shoud not rely on it ?

Depends if your physic engine implement that well for all cases or not.

It's usefull indeed for any triggers and enter contact of different objects, character entities.

 

Perhaos some new functionnality to submit to Newton 3 forums ?

Stop toying and make games

Link to comment
Share on other sites

Lot of games use that function without problem ,why shoud not rely on it ?

Depends if your physic engine implement that well for all cases or not.

It's usefull indeed for any triggers and enter contact of different objects, character entities.

 

Perhaos some new functionnality to submit to Newton 3 forums ?

 

..reason why you dont want physics engine to deal with this is called Frame Rate vs. Object Speed.

There is no physics engine, fixed this issue yet. Its basically number of moments in time per second when physics is calculated. Each frame is treated as separate from all other frames, and the space between frames is not calculated. A low framerate and a small fast-moving object leads to a situation where the object does not move smoothly through space but in fact seems to teleport from one point in space to the next point in space as each frame is calculated. At sufficiently high speeds a projectile will miss a target, if the target is small enough to fit in the gap between the calculated frames of the fast moving projectile. So, the most viable way is to calculate trajectory what will fit within non calculated frames, and use raycast to check objects for collision, once that particular frame is calculated with new position. Thats what AAA games using most of the time. One i know 100% is ratchet and Clank as i have full source of entire game as well as Uncharted.

  • Upvote 3

 

Link to comment
Share on other sites

The hit boxes in what Josh is talking about are non physics based. They are just "models". I believe Raycasting goes against "models" and not physics. If you wanted to use a physics bullet then you'd need physics shapes.

 

hmmm thats odd since raycasting in any engine I have ever tried is physics based, and still it appears to be this way in LE3 which makes sense since its derived from newton. if you look at Josh's video again, you will see that its a rigidbody that he was attaching to the bones as a hitbox. Unless LE3 also gives physic entities coloring as well, then i suspect the hitbox mesh you see is just to make it obvious what he was doing.

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

In LE 2 I thought raycasting was done on the geometry which was why when we had complex character models the first time delay raycast bug was there. I guess now that you say that LE 2 automatically created the physics model based on the actual model so yeah you are right. Sorry, I've removed my statement as to not confuse the matter.

Link to comment
Share on other sites

Lot of games use that function without problem ,why shoud not rely on it ?

Depends if your physic engine implement that well for all cases or not.

It's usefull indeed for any triggers and enter contact of different objects, character entities.

 

Perhaos some new functionnality to submit to Newton 3 forums ?

 

Physics have a fixed timestep, they are not updated every frame. When framerate drops, physics update intervals increase, rigidbodies and other physics stuff gets updated less. Rigidbodies start to move erratically, collision events on moving rigidbodies do not happen correctly etc.

Link to comment
Share on other sites

the delay was due to for some reason that LE2 had a separate setup for so-called "raycast structures" than from the PHY bodies... which was odd, because talking to Julio Jerez they should have been one and the same object/entity. I am not sure how josh resolved that in his implementation - either by fixing the disparity or actually performing a raycast internally on every entity loaded into a scene...

  • Upvote 1

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...