mirror of
https://github.com/Dejvino/roadtrip
synced 2024-11-13 04:27:30 +00:00
Added a fence made in Blender as a static object.
This commit is contained in:
parent
da8c1e6bc7
commit
17cecdcf2b
@ -6,11 +6,14 @@ A game about a journey involving vehicles and obstacles.
|
||||
## Status
|
||||
### DONE
|
||||
* Physics-based vehicle
|
||||
* Driving controls (UHJKM)
|
||||
* Camera following the player
|
||||
* Hilly ground
|
||||
* Collidable objects (testing)
|
||||
* Collidable objects - static and dynamic
|
||||
|
||||
### TODO
|
||||
* Orbit camera
|
||||
* Rigid objects (fences, houses)
|
||||
* People
|
||||
* Walking around - NPCs
|
||||
* Walking around - Player
|
||||
* Enter / Exit a car
|
BIN
assets-src/Models/fence.blend
Normal file
BIN
assets-src/Models/fence.blend
Normal file
Binary file not shown.
BIN
assets/Models/fence.j3o
Normal file
BIN
assets/Models/fence.j3o
Normal file
Binary file not shown.
3
assets/Models/fence.j3odata
Normal file
3
assets/Models/fence.j3odata
Normal file
@ -0,0 +1,3 @@
|
||||
#
|
||||
#Sat Dec 31 15:42:32 CET 2016
|
||||
ORIGINAL_PATH=Models/fence.scene
|
Binary file not shown.
BIN
screenshot.png
BIN
screenshot.png
Binary file not shown.
Before Width: | Height: | Size: 910 KiB After Width: | Height: | Size: 938 KiB |
@ -72,12 +72,14 @@ public class RoadTrip extends SimpleApplication implements ActionListener {
|
||||
inputManager.addMapping("Rights", new KeyTrigger(KeyInput.KEY_K));
|
||||
inputManager.addMapping("Ups", new KeyTrigger(KeyInput.KEY_U));
|
||||
inputManager.addMapping("Downs", new KeyTrigger(KeyInput.KEY_J));
|
||||
inputManager.addMapping("Revs", new KeyTrigger(KeyInput.KEY_M));
|
||||
inputManager.addMapping("Space", new KeyTrigger(KeyInput.KEY_SPACE));
|
||||
inputManager.addMapping("Reset", new KeyTrigger(KeyInput.KEY_RETURN));
|
||||
inputManager.addListener(this, "Lefts");
|
||||
inputManager.addListener(this, "Rights");
|
||||
inputManager.addListener(this, "Ups");
|
||||
inputManager.addListener(this, "Downs");
|
||||
inputManager.addListener(this, "Revs");
|
||||
inputManager.addListener(this, "Space");
|
||||
inputManager.addListener(this, "Reset");
|
||||
}
|
||||
@ -255,6 +257,18 @@ public class RoadTrip extends SimpleApplication implements ActionListener {
|
||||
}
|
||||
vehicle.brake(0, b);
|
||||
vehicle.brake(1, b);
|
||||
} else if (binding.equals("Revs")) {
|
||||
if (value) {
|
||||
accelerationValue += accelerationForce;
|
||||
} else {
|
||||
accelerationValue -= accelerationForce;
|
||||
}
|
||||
vehicle.accelerate(2, -accelerationValue);
|
||||
vehicle.accelerate(3, -accelerationValue);
|
||||
if (carType == TRUCK) {
|
||||
vehicle.accelerate(4, -accelerationValue);
|
||||
vehicle.accelerate(5, -accelerationValue);
|
||||
}
|
||||
} else if (binding.equals("Space")) {
|
||||
if (value) {
|
||||
vehicle.applyImpulse(jumpForce, Vector3f.ZERO);
|
||||
|
Loading…
Reference in New Issue
Block a user