New version.
Mostly internal changes.
- in edit mode, can right click to select the object under the cursor (within 1000 units)
- uses n-gons for rendering rather than triangles
- clipping is performed in 3d
As a result of the above points, the script code to render is faster (probably about 50% faster) and much less complicated. Also, the wireframes in the selection mode look better.
Again, there may be bugs. Please let me know if you see anything unusual - except the sorting bug!
[EDIT] Link as before.
[EDIT2]
Added some functions:
SetWindow(int x, int y, int w, int h)
- sets the extents of the 3d window (can have a small window for faster rendering)
- doesn't clip the objects or characters so you need to draw a frame around it
SetCamera(float nearClipPlaneDistance, float fieldOfViewDegrees)
- hopefully self explanatory
The above can be called at any time, so you could change the FOV for special effects, or move or resize the window while playing.
SetPrimVisible(int i, bool visible)
- allows you to have collision only primitives
SetPrimGround(int i, bool ground)
- allows you to disable walking over primitives
- you still move above it, but the camera doesn't move up or down
- useful for small details on floors
SetPrimSolid(int i, bool solid)
- allows you to walk through primitives
- useful for small details on walls, and for slopes
[EDIT3]
I have noticed that pitching and banking an object distorts it. Fixed! Must remember to bracket everything. In AGS scripting -a - b == -(a - b)!
Mostly internal changes.
- in edit mode, can right click to select the object under the cursor (within 1000 units)
- uses n-gons for rendering rather than triangles
- clipping is performed in 3d
As a result of the above points, the script code to render is faster (probably about 50% faster) and much less complicated. Also, the wireframes in the selection mode look better.
Again, there may be bugs. Please let me know if you see anything unusual - except the sorting bug!
[EDIT] Link as before.
[EDIT2]
Added some functions:
SetWindow(int x, int y, int w, int h)
- sets the extents of the 3d window (can have a small window for faster rendering)
- doesn't clip the objects or characters so you need to draw a frame around it
SetCamera(float nearClipPlaneDistance, float fieldOfViewDegrees)
- hopefully self explanatory
The above can be called at any time, so you could change the FOV for special effects, or move or resize the window while playing.
SetPrimVisible(int i, bool visible)
- allows you to have collision only primitives
SetPrimGround(int i, bool ground)
- allows you to disable walking over primitives
- you still move above it, but the camera doesn't move up or down
- useful for small details on floors
SetPrimSolid(int i, bool solid)
- allows you to walk through primitives
- useful for small details on walls, and for slopes
[EDIT3]
I have noticed that pitching and banking an object distorts it. Fixed! Must remember to bracket everything. In AGS scripting -a - b == -(a - b)!