Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Having prims collide with each other without submitting to gravity

Ross Penucca
Super Rubik's User
Join date: 3 Jun 2008
Posts: 26
06-08-2008 03:43
I was told to cross post this from the building section to here to see if I could get possible help from the scripting crew and the building crew at the same time:

As the title of the topic says: what I'm trying to do is find a way that two prims can be physical of one another but not be physical in the sense that they're affected by gravity. For example: rear-view mirror fuzzy dice that are hanging by the string. However, I don't want the pieces to be dependent upon the string, I'd like for them to hover in the air but still collide with one another. This would be my first obstacle to overcome. After this, I would need to know how to anchor two pieces together but still allow them to turn. For example: a wheel and axle. The axle needs to be stationary, but allow the wheel to turn without letting the wheel come off of the axle. THEN after I get that figured out, I would need to know how to script turns for different pieces of the combination of prims. For example: one wheel on each side of an axle. I would need the left wheel to rotate one direction, stop, then the right wheel to rotate the opposite direction. All of this will allow me to complete my first build project that I want to keep a secret because if this hasn't been done yet, I don't want to have someone steal the idea. >:0 So yeah, I'll be trying to research a way to do all of this while generous people like you all could give some insight as to how I would make this magic happen.
Thanks,
Ross Penucca

EDIT: I'm guessing that for the "axle and two wheels" set, I would need to link them together in order to anchor them all together, but then that wouldn't allow them to move freely from one another, would it? If so, then how would they be able to be anchored to each other while still being able to move freely?

EDIT #2: Here is a list of all of the prims that are to be included (in case this helps):

1) 1x 3-prim group of cylinders (very similar to an XYZ trio of axes)
2) 6x 2-prim groups of 1 cylinder and 1 rectangle each (similar to a thumb tack)
3) 12x 2-prim groups of 1 square and 1 rectangle each (similar to a "T";)
4) 8x 2-prim groups of 1 square and 1 eighth-sphere each (similar to a cube stuck in part of a rock?)

The 1x would be the aforementioned "axle" and the 6x's would be the aforementioned "wheels". So the 6x's would need to be anchored to the 1x (one on each positive and negative of all x, y, and z axes, in other words) so they don't fall off of the 1x, but the 6x's all need to be able to rotate freely from one another, affecting none of the other five 6x's or the 1x. If this is too confusing to you, PLEASE PM me and if you seem willing to help and not take my idea (which I should just go ahead and copyright the idea to me now...for SL purposes anyways), then I'll tell you what I'm trying to make so that could help clear up confusion.

EDIT #3: I've also noticed that that's a total of 55 BASIC prims, but since there are groups of prim groups, would it technically be going over the 31 prim limit or no? I would think not since each group of prims would act as one prim toward the main group, which would be the 1x XYZ axis.
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
06-08-2008 05:10
My guess would be some sort of distance checking using llVectDist(). If the prims were close enough, that would be considered a 'collision'. It wouldn't however trigger a collision event, so you'd have to do your own branching from there.

Hope that helps.


http://www.secondscripter.com/
_____________________
My tutes
http://www.youtube.com/johanlaurasia
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
06-08-2008 05:16
From: Ross Penucca

As the title of the topic says: what I'm trying to do is find a way that two prims can be physical of one another but not be physical in the sense that they're affected by gravity.

use the LSL function: llSetBuoyancy( 1.0 ); and your physical object should flow in the air.
You may alternatively apply a force equal to but opposite gravity:
llSetForce( llGetMass()* < 0.0, 0.0, 9.8 >, FALSE);
_____________________
From Studio Dora