Yes, you have to sign them. Have a look at http://wiki.java.net/bin/view/Games/HowToUseWebstart to see how.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: "Crowley"As far as the engine is concerned, we aren't actually looking down from above, but from the side, along the Z-axis.Shouldn't matter that much. The code may still work with some additional rotation magic applied to it. In fact, i wrote a little demo application for myself, where a MD2-model was moving towards the mouse. The camera was looking from somewhere between z and y axis down to the origin and it worked fine.
setEllipsoidMode(Object3D.ELLIPSOID_TRANSFORMED);
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import com.threed.jpct.*;
import com.threed.jpct.util.*;
class TargetDemo {
private FrameBuffer buffer=null;
private World theWorld=null;
private TextureManager texMan=null;
private int width=640;
private int height=480;
private Frame frame=null;
private Graphics gFrame=null;
private int titleBarHeight=0;
private int leftBorderWidth=0;
private boolean exit=false;
private KeyMapper keyMapper=null;
private int mouseX;
private int mouseY;
private Object3D arrow=null;
public static void main(String[] args) {
new TargetDemo();
}
private TargetDemo() {
theWorld=new World();
texMan=TextureManager.getInstance();
Config.fadeoutLight=false;
theWorld.setAmbientLight(255, 255, 255);
texMan.addTexture("arrow", new Texture("textures"+File.separatorChar+"arrow.jpg"));
arrow=Primitives.getPlane(1,10);
arrow.setTexture("arrow");
arrow.setTransparency(1);
arrow.rotateX((float) (Math.PI/2d));
arrow.rotateMesh();
arrow.setRotationMatrix(new Matrix());
arrow.build();
theWorld.addObject(arrow);
theWorld.getCamera().setPosition(0,-100,0);
theWorld.getCamera().rotateCameraX((float) (Math.PI/2d));
Config.tuneForOutdoor();
initializeFrame();
gameLoop();
}
private void initializeFrame() {
frame=new Frame();
frame.setTitle("jPCT "+Config.getVersion());
frame.pack();
Insets insets=frame.getInsets();
titleBarHeight=insets.top;
leftBorderWidth=insets.left;
frame.setSize(width+leftBorderWidth+insets.right, height+titleBarHeight+insets.bottom);
frame.setResizable(false);
frame.show();
gFrame=frame.getGraphics();
keyMapper=new KeyMapper(frame);
frame.addMouseMotionListener(new MouseMotionAdapter(){
public void mouseMoved(MouseEvent e) {
mouseX=e.getX()-frame.getInsets().left;
mouseY=e.getY()-frame.getInsets().top;
}
});
}
private void display() {
buffer.display(gFrame, leftBorderWidth, titleBarHeight);
}
private void gameLoop() {
World.setDefaultThread(Thread.currentThread());
Thread.currentThread().setPriority(Thread.NORM_PRIORITY);
buffer=new FrameBuffer(width, height, FrameBuffer.SAMPLINGMODE_NORMAL);
buffer.enableRenderer(IRenderer.RENDERER_SOFTWARE);
buffer.setBoundingBoxMode(FrameBuffer.BOUNDINGBOX_USED);
while (!exit) {
poll();
buffer.clear();
theWorld.renderScene(buffer);
theWorld.draw(buffer);
buffer.update();
display();
// Rotation stuff
SimpleVector arrowCenter=Interact2D.projectCenter3D2D(buffer, arrow);
if (arrowCenter!=null) {
arrowCenter.z=0;
SimpleVector delta=arrowCenter.calcSub(new SimpleVector(mouseX, mouseY, 0));
delta.z=delta.y;
delta.x*=-1;
delta.y=0;
Matrix rotMat=delta.getRotationMatrix();
arrow.setRotationMatrix(rotMat);
if (delta.length()>5) {
// Move the arrow slowly...
SimpleVector t=arrow.getZAxis();
t.scalarMul(0.1f);
arrow.translate(t);
}
}
Thread.yield();
}
keyMapper.destroy();
System.exit(0);
}
private void poll() {
KeyState state=null;
do {
state=keyMapper.poll();
if (state!=KeyState.NONE) {
keyAffected(state);
}
} while (state!=KeyState.NONE);
}
private void keyAffected(KeyState state) {
int code=state.getKeyCode();
boolean event=state.getState();
switch (code) {
case (KeyEvent.VK_ESCAPE): {
exit=event;
break;
}
}
}
}
feritoID != "none"
if ((obj_up) && (!feritoID.equals("none"))){
Object3D oggetto=theWorld.getObjectByName(feritoID);
SimpleVector trsl= new SimpleVector(5f,0f,0f);
trsl=oggetto.checkForCollisionSpherical(trls, 10f);
oggetto.translate(trsl);
}
Page created in 0.047 seconds with 11 queries.