x


Ray curve for bullet gravity effect, or any way to make it

hey every one... i'm using raycast to shoot with my sniper, but it goes in a direct line... i want to make the gravity effect, but i don't know how to do it... if i could make a curved ray would be perfect, but i don't know how to do it. Some one can help me with this?

Thanks guys :)

more ▼

asked Apr 10, 2011 at 06:37 PM

Leonardo T S gravatar image

Leonardo T S
37 9 10 11

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Do a series of short raycasts, and alter the angle slightly for each one so that it starts heading down over a longer distance. So basically it's approximately a curve, broken up into a number of straight segments.

more ▼

answered Apr 10, 2011 at 07:28 PM

Eric5h5 gravatar image

Eric5h5
110k 55 181 660

ok i think on that, but i was not sure with the performance... i will try that. Btw, it will take much process? Thanks

Apr 10, 2011 at 07:47 PM Leonardo T S

It's naturally more expensive than using a single raycast, but since this is for a sniper rifle, you'd presumably only be doing it occasionally, and not hundreds of times per second, so it wouldn't be an issue.

Apr 10, 2011 at 08:35 PM Eric5h5
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2828
x790
x500
x430
x143

asked: Apr 10, 2011 at 06:37 PM

Seen: 1913 times

Last Updated: Apr 10, 2011 at 06:37 PM