Jump to content
AnniXa

What is faster? bodybox VS bodySphere

Recommended Posts

when i want to have very small stuff, where i dont need to care about its shape because it are for example small bullets, what is then faster?

BodyBox or BodySphere?

 

i think a sphere just do raycast with a radius internally?

i read that somewhere in the newton forums

while box is doing racast from its edges or something?

 

what would you prefer?

Share this post


Link to post

Be careful with really small physics bodies. They can have collision issues I believe. But I think there is some sweeping kind of setting you can do to avoid these collision issues but I think it takes more processing power to set that.

Share this post


Link to post

yea i saw that, actually i need to use swept collision sad.png

otherwise my bullits fly threw my walls, (and the walls are not soo thin, they are 1.0 unit width at least)

 

well what would you prefer for small stuff anyway? a bodybox or a bodysphere?

Share this post


Link to post

You're probably splitting hairs so I wouldn't worry to much about it now. If anything pick one but make it easy to switch. That way you can just test out which is better.

Share this post


Link to post

..then, I think its better to have linepick, and where is the position, returned by linepick at the moment of firing weapon, is where bullet will impact, therefore also, where particle appear and so on..on this way you will just move your bullet between gun position and impact position returned by linepick, at speed you desire and you are set..no physics required..

Share this post


Link to post

Personally, I prefer raycasting for all projectiles (bullets and rockets).

 

If realism isn't important and you don't care about bullet drop, wind or air resistance then it's a lot faster, and for bullets, you don't even need to draw it - you can just draw a spark and a bullet hole where it hit.

Share this post


Link to post

Personally, I prefer raycasting for all projectiles (bullets and rockets).

 

If realism isn't important and you don't care about bullet drop, wind or air resistance then it's a lot faster, and for bullets, you don't even need to draw it - you can just draw a spark and a bullet hole where it hit.

 

yea thats true, in my case it are not so fast bullets.

Like rockets or something, that are needed to draw

Share this post


Link to post

As long as you save where the bullet / rocket is for each physics update... Draw the rocket at that position, and do a small raycast, like 1 unit in front of that position. Until the raycast hits something, then you hide rocket again.

Share this post


Link to post

Battlefield has real projectiles for all the bullets...

Yeah. I would prefer real projectiles if i want to have ballistics and stuff. Arma 2 has real projectiles too.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

×
×
  • Create New...