realbasic-games
[Top] [All Lists]

Re: trimesh particles demo, version 2

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: trimesh particles demo, version 2
From: Jeff Quan <jquan at mindspring dot com>
Date: Thu, 5 Oct 2006 09:50:45 -0700
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-games at lists dot realsoftware dot com
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=mindspring.com; b=VEqGS6h0wcVxtjcTwMiuXuaE+ie5bY615IofcIpu+aCaDEqU38L4HZpH+9qqrPwb; h=Received:Mime-Version:In-Reply-To:References:Content-Type:Message-Id:From:Subject:Date:To:X-Mailer:X-ELNK-Trace:X-Originating-IP;
References: <33cbfa100610050105q11175470g2522858537a53c3c at mail dot gmail dot com> <33cbfa100610050109r5acd6c57x59ec58f2e9f79e31 at mail dot gmail dot com> <F01D5133-A770-4F5B-839A-3F56CFFE8273 at pyramiddesign dot us>
On Oct 5, 2006, at 7:02 AM, Joseph Nastasi wrote:
This is very neat. I haven't had the time to work on it, but I'm wondering how you would "attach" this particle generator to an arm holding a gun, lets' say, and change it's position and orientation. My first thought is that you have to do it per particle since there is no overall Group3D to rotate and translate.

One way I can think of is to add a Group3D property to the TrimeshParticles class. In the Constructor, Append every Particle to that Group3D and add the group to the RB3Dspace. Now you should be able to rotate the entire Group3D and the particles will follow along. Be sure to also remove the Group3D from the RB3Dspace after the particles are dead.

The only reason why you need to add the Group3D to the RB3Dspace is that I've found that, unlike Object3Ds, Group3Ds don't seem to update unless they're in the RB3Dspace itself. I've only tested this for rotation; I haven't tried translation. Scaling don't seem to work for Group3Ds.
==
Jeff Quan
jquan at mindspring dot com
http://www.jcquan.com/JQportfolio


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>