Author Topic: Raycasting  (Read 4742 times)

The line isn't supposed to be curved. It has 2 straight parts.

The line isn't supposed to be curved. It has 2 straight parts.
Hmm.. Maybe I misunderstood.

it would arc towards the feet of the bot instantly, and pain would ensue.

Arcs imply curves? Takato, mind clearing this up?

Well yesterday on steam he told me that it would trace a straight line until it comes in range of a player, and then instanly redirects to the player.

Well, while everyone is working out how to do the raycasting stuff, is it even possible to create emitters along a curved line faster than a projectile?

I guess you could make emitter nodes along the line that all fire an emitter in the direction of the curve at that point.

I know there's some vars that you can modify with particles and emitters that will let you make a curved projection, but you cant be modifying datablocks at runtime..


Edit: Hmm. Actually, i think you could sorta do it with the emitter datablock variables. You would have to place an emitter node at the muzzle point, then rotate it so that the 'beam' of particles arc in the direction you want. Although then you would need a way to adjust how wide the arc is, and where it stops, which you would need to modify the datablock again..
This is tough.
It's not a curved line, its two straight lines

I said arc because that's what I called the function for simplicity, it just redirects once it's within a certain range of a suitable target
« Last Edit: April 30, 2014, 01:40:37 PM by takato14 »

Just use one animated static shape per line.

Just use one animated static shape per line.
Shape? how would that work?

Also I'm afraid of this being way too server intensive if I even do end up getting it to work, this weapon can't be fired very rapidly but still...

And actually, overriding the projectile speed limit would be more accurate to the game Im imitating anyways, if that's possible

https://www.youtube.com/watch?v=ux4L3v9J_CI

this is what I'm trying to recreate
« Last Edit: April 30, 2014, 01:52:15 PM by takato14 »

Shape? how would that work?

  • Create a static shape.
  • Position it inbetween the two points and rotate it.
  • Scale it on an axis based on the orientation of the model to the distance between the points.
  • Play a thread on it.

  • Create a static shape.
  • Position it inbetween the two points and rotate it.
  • Scale it on an axis based on the orientation of the model to the distance between the points.
  • Play a thread on it.
wait what, you can scale something IN torque? That would be even closer to the real thing

do you see just how little I know about this engine, I really think I've bitten off more than I can chew here
« Last Edit: April 30, 2014, 01:58:50 PM by takato14 »

Static shapes, by nature, can be pretty much anything you want them to be. Their main drawback is they cannot have movement. You can simulate their movement by very quickly deleting them and the recreating them at a new position along a path.

What Port suggested by using these is probably the best solution. The main issue will be the complex math for scaling the shapes correctly. (I'm sure Port could do it, though)
« Last Edit: April 30, 2014, 03:21:49 PM by Pecon »

blah
Static shapes can be animated, and moved... unlike bricks. That is why you would use them in the first place.

Static shapes, by nature, can be pretty much anything you want them to be. Their main drawback is they cannot have movement. You can simulate their movement by very quickly deleting them and the recreating them at a new position along a path.

What Port suggested by using these is probably the best solution. The main issue will be the complex math for scaling the shapes correctly. (I'm sure Port could do it, though)
yeah go check his A* implementation, his item that draws paths have code for lines with static shapes and such

Static shapes can be animated, and moved... unlike bricks. That is why you would use them in the first place.
I never even mentioned anything about bricks, why are you acting like I had?

I never even mentioned anything about bricks, why are you acting like I had?
You said that static shapes couldn't be moved.

You said that static shapes couldn't be moved.
I said they cannot have movement. The second part of my post was just an explanation of how moving static shapes essentially worked. By 'movement' I meant that they can't have gravity/momentum that the engine manages automatically.

I said they cannot have movement. The second part of my post was just an explanation of how moving static shapes essentially worked. By 'movement' I meant that they can't have gravity/momentum that the engine manages automatically.
Oh. Well you can just call settransform() or create an animation to have movement, even though it's not physics based.