Jump to content
Sign in to follow this  
Thoth Mason

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

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?

 

 

 

 

 

Share this post


Link to post
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.

 

Share this post


Link to post
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 .

Share this post


Link to post
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

Share this post


Link to post
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.

 

Share this post


Link to post
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.

 

 

 

Share this post


Link to post
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.

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.

Sign in to follow this  

×
×
  • Create New...