Jump to content

Collisions between object types, can't find the right combination.


Thoth Mason
 Share

You are about to reply to a thread that has been inactive for 3662 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I'm planning a shooting gallery type game, and am struggling to find collisions that work.

 

What I'd like is:

   *  A root prim (backdrop) with linked prims (targets) attached to the front of it.  

   *  A "missle" prim to be thrown/fired at the targets.

 

I'm trying to get the linked prims to handle their own collision events.  The only combination that seems to make any sense at all is:

 

   * Root prim and linked prims are non-physical non-phantom.

   * Missle is physical.

 

Anthing else and the linked prims don't get a collide() event.  Is there any way to do this with a non-physical missle?

 

 

 

 

 

Link to comment
Share on other sites

I can't think of many ways to make a non-physical missle.  Using llSetKeyframedMotion will work, but will make your slow-moving "missle" phantom.  Using llSetPos or its variants (llSetRegionPos, SLPP, etc.) will move your "missle" directly, without following any sort of path that would lead to a collision.  I think you're stuck with a physical missile, which is the normal way of doing things anyway.

 

Link to comment
Share on other sites

if your using mouse look to aim you could use http://wiki.secondlife.com/wiki/LlDetectedTouchPos in the target and back ground prims.  When touched have them message the missile to give it the target pos to hit, the missile just become a visual effect, the original touch would be the actual trigger for counting the impact for event with game, such as score keeping.  The missile still could explode on collision to trigger particle effects but  not need a special target, it would just explode on any colission.


http://wiki.secondlife.com/wiki/LlCastRay might all so work, looks like it can detect linknumbers, cast ray was intended for this kind of use, but it's not something I've worked with much.  again i think it's an other case of the bullet or missile just being the effect .

Link to comment
Share on other sites

All right, it looks like I'll stick with a physical missle.  

 

It's supposed to be slow moving, and I'm dreading interference from things like wind, other physical objectsn nearby, and frankly being manipulated easily by the user.  

 

Thanks

Link to comment
Share on other sites

The ray is a good idea, but I was looking for something a bit more slower and missile like.

One thing I didn't mention is that I'm specifically avoiding mouse-look.  Much like a platformer game, it needs to be viewed side-on and from a distance.

 

Thank you.

 

Link to comment
Share on other sites

llCastRay() can't be sceen, it just finds the target or object pos / info, of what is in front of  it.  You can use llCastRay without mouse look.

http://wiki.secondlife.com/wiki/LlCastRay

Ideas for uses:

  • Weapons - Raycasts are the traditional tool used in game development for simulating projectile weapons. They are orders of magnitude more efficient than rezzing a prim and launching it from a weapon.

If what you have all ready works that might be the best way, with cast ray for a missile you would still have to rez the missile and cast the ray, and have the two talk  to each other, I think most the of the time with castray people are using a particle effect, which is better for bullets and lasers.

 

 

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3662 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...