Comments (2)
I've tried the same code for g3d and .md2 and the code works if you follow the
instructions. One instruction missing is that when going for .md2 you need to
add an import to
import com.badlogic.gdx.graphics.g3d.materials.*;
and everything works, UNTIL,
you try to play animation other than default, which is 0("all")
anim = (KeyframedAnimation)model.getAnimations()[0];
The sam issue is with g3d animations. So both of us do not know how to start an
animation other than "all".
I tried my model animation exported from blender and there is the same issue.
If I play [0] animation, all is ok, but if I change it to other, say [2]
I get an error you are pointing out.
Original comment by [email protected]
on 17 Dec 2011 at 4:15
from libgdx-users.
Hi,
i resolved the issue with ArrayIndexOutOfBoundsException problem when playing
selected parts of .md2 keyframe animation.
The workaround is somewhere around line 175 of file MD2Loader.java:
float[] vertices = new float[header.numVertices * 6]; // changed from *3 to *6
and
around line 182, added 3 lines for vertices:
vertices[idx++] = frame.vertices[idxV++];
vertices[idx++] = frame.vertices[idxV++];
vertices[idx++] = frame.vertices[idxV++];
I really hope this is not just a workaround, and that it's not going to create
some other issues :)
Hope this helps someone else...
Original comment by [email protected]
on 18 Dec 2011 at 1:46
from libgdx-users.
Related Issues (20)
- add OOTB working "hello world" package for applet deployment
- Particle editor jar for macosx
- crash in emulator: "Can not use IndexBufferObject with GLES 1.0, need 1.1 or 2.0" HOT 2
- SpriteCache.draw (int cacheID, int offset, int length) can't draw Sprite normally
- Freetype natives problem in applet
- where is the demo code to download? HOT 1
- PatternSyntaxException in AndroidFileHandle.java HOT 1
- Ninepatch scaling problem HOT 6
- Some fonts in 0.96 rendering as solid white blocks HOT 2
- [error] Unable to create directory __libgdx_setup_tmp HOT 13
- setListener (addListener) removed from ButtonGroup
- Soft-keyboard not picking up backspace on Android 4.2 HOT 1
- ArrayIndexOutOfBoundsException with DualShock USB Controller
- HTML5 Build: application doesnt start with empty BitmapFont Constructor
- java.lang.NumberFormatException in class com.badlogic.gdx.graphics.g2d.TextureAtlas
- SpriteBatch needs an interface
- Sound + request for new feature (no hurry)
- [error] Unable to create directory __libgdx_setup_tmp
- The project was not built since its build path is incomplete. Cannot find the class file for org.robovm.cocoatouch.uikit.UIApplicationDelegate$Adapter. HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libgdx-users.