Away3D with IN2AR - Camera Lens issue

Software: Away3D 4.x

Simon Kendrew, Newbie
Posted: 08 September 2015 08:53 AM   Total Posts: 9

I am using Away3D4 with IN2AR augmented reality plugin, using sample code provided by IN2AR. The version of Away3D that is bundled with the IN2AR code is version 4, but earlier than 4.1.4. I cannot determine the exact version number, and I have contacted IN2AR, but had no response. I need to update Away3D to a newer version (4.1.4 or 4.1.6) in order to load in several AWD files that include lighting and animation. However, when I use one of these newer versions of Away3D, the sample code from IN2AR intermittently crashes, throwing the error following error:

‘Error: An abstract method was called! Either an instance of an abstract class was created, or an abstract method was not overridden by the subclass.’

This is located in the class that is being extended by IN2Ar’s class.

The function that throws the error is:

public function unproject(nX:Number, nY:Number, sZ:Number, v:Vector3D = null):Vector3D
throw new AbstractMethodError();

I am wondering if there is an easy solution to correct this? I have contacted IN2AR about the error, but again, I have had no response from them.

I have attached both the and files in a zip file, if anyone can offer advice, it would be very much appreciated.


File Attachments  (File Size: 3KB - Downloads: 325)

rdoi, Member
Posted: 08 September 2015 05:46 PM   Total Posts: 86   [ # 1 ]

Well, I remember tried IN2AR a couple of months ago and faced the same problem. The point is really the Away’s version, the swc shipped in IN2AR is something 4.0.x, and so IN2AR implements a custom lens, extending an old LensBase.

3 options:

You could work with the older Away 4.0x, get the correct version from Git repo.

You could try bypassing the error, rewriting the custom lens, adding a “dummy” unproject method in this Away3DCameraLens.

Or maybe copy the missing code from PerspectiveLens.
The later is preferable, but pretty hard without some good knowledge of the engine.

Good luck


Simon Kendrew, Newbie
Posted: 09 September 2015 07:53 AM   Total Posts: 9   [ # 2 ]

Thank you for the advice rdoi. I will investigate further and post back with my results in due course.



Away3D Forum

Member Login