I had a go at porting it but without success. Any help would be
appreciated. I basically changed Number3D properties to Vector3D and
changed MatrixAway3D to Matrix3D. Here is a snippet of the update
method:
arcane override function update():void {
if (target != null){
_targetTransform.rawData = target.transform.matrix3D.rawData;
_xPositionOffset =
_targetTransform.transformVector(positionOffset);
_xLookOffset = _targetTransform.transformVector(lookOffset);
_desiredPosition = target.position.add(_xPositionOffset);
_lookAtPosition = target.position.add(_xLookOffset);
_stretch = this.position.subtract(_desiredPosition);
_stretch.scaleBy( -stiffness);
_dv = new Vector3D(_velocity.x * damping, _velocity.y * damping,
_velocity.z * damping);
_force = _stretch.subtract(_dv);
_acceleration = new Vector3D(_force.x * (1/mass), _force.y * (1/
mass), _force.z * (1/mass));
_velocity = _velocity.add(_acceleration);
_xPosition = position.add(_velocity);
x = _xPosition.x;
y = _xPosition.y;
z = _xPosition.z;
lookAt(_lookAtPosition);
if (Math.abs(_zrot) > 0)
rotate(_zrot,new Vector3D( 0, 0, 1));
}
super.update();
}
On Jul 20, 11:50 pm, Michael Iv <[email protected]> wrote:
> I don't think it would be a problem to port it. Just need to add physical
> behavior to the basic camera . I will take a look at it too.
>
> Sent from my iPhone
>
> On Jul 21, 2010, at 12:23 AM, finty <[email protected]> wrote:
>
>
>
> > I forgot to add that I am using Away3DLite and there is no
> > SpringCam... I'll have a look at the code for it though so thanks.
>
> > On Jul 20, 7:24 pm, Michael Iv <[email protected]> wrote:
> >> Use SpringCam ,offset its position and look
>
> >> On Tue, Jul 20, 2010 at 6:51 PM, fintan boyle <[email protected]>
> >> wrote:
> >>> Would anyone be able to point me in the direction of an example of how to
> >>> create an over-the-shoulder camera perspective? My idea is to add the
> >>> camera object and target object to an ObjectContainer3D and get the camera
> >>> to lookat() the target object and have an offset and then animate the
> >>> container object to get movement. I'm having difficulty setting this up.
>
> >>> cheers,
>
> >>> Fintan
>
> >> --
> >> Michael Ivanov ,Programmer
> >> Neurotech Solutions Ltd.
> >> Flex|Air
> >> |3D|Unity|www.neurotechresearch.comhttp://blog.alladvanced.nethttp://www.meetup...
> >> Tel:054-4962254
> >> [email protected]
> >> [email protected]