mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Fixed boat trials rendering abnormally
#issue[65] #fix
This commit is contained in:
@@ -7,7 +7,7 @@ import javafx.geometry.Point2D;
|
|||||||
import seng302.utilities.GeoUtility;
|
import seng302.utilities.GeoUtility;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cir27 on 26/09/17.
|
* Contains information on a scaled lat lon point for use with mapping geographical elements to a 2d plane.
|
||||||
*/
|
*/
|
||||||
public class ScaledPoint extends GeoPoint {
|
public class ScaledPoint extends GeoPoint {
|
||||||
|
|
||||||
|
|||||||
@@ -407,10 +407,10 @@ public class GameView3D extends GameView{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handle(long now) {
|
public void handle(long now) {
|
||||||
if (--count == 0) {
|
|
||||||
count = 60;
|
|
||||||
Node segment = ModelFactory.importModel(ModelType.TRAIL_SEGMENT).getAssets();
|
|
||||||
Point2D location = scaledPoint.findScaledXY(playerYacht.getLocation());
|
Point2D location = scaledPoint.findScaledXY(playerYacht.getLocation());
|
||||||
|
if (Math.abs(lastLocation.distance(location)) > 2) {
|
||||||
|
Node segment = ModelFactory.importModel(ModelType.TRAIL_SEGMENT).getAssets();
|
||||||
|
location = scaledPoint.findScaledXY(playerYacht.getLocation());
|
||||||
segment.getTransforms().addAll(
|
segment.getTransforms().addAll(
|
||||||
new Translate(location.getX(), location.getY(), 0),
|
new Translate(location.getX(), location.getY(), 0),
|
||||||
new Rotate(playerYacht.getHeading(), new Point3D(0,0,1))
|
new Rotate(playerYacht.getHeading(), new Point3D(0,0,1))
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
<author>Blender User</author>
|
<author>Blender User</author>
|
||||||
<authoring_tool>Blender 2.78.0 commit date:2016-09-26, commit time:12:42, hash:4bb1e22</authoring_tool>
|
<authoring_tool>Blender 2.78.0 commit date:2016-09-26, commit time:12:42, hash:4bb1e22</authoring_tool>
|
||||||
</contributor>
|
</contributor>
|
||||||
<created>2017-09-26T00:58:51</created>
|
<created>2017-09-26T01:05:25</created>
|
||||||
<modified>2017-09-26T00:58:51</modified>
|
<modified>2017-09-26T01:05:25</modified>
|
||||||
<unit name="meter" meter="1"/>
|
<unit name="meter" meter="1"/>
|
||||||
<up_axis>Z_UP</up_axis>
|
<up_axis>Z_UP</up_axis>
|
||||||
</asset>
|
</asset>
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
<library_visual_scenes>
|
<library_visual_scenes>
|
||||||
<visual_scene id="Scene" name="Scene">
|
<visual_scene id="Scene" name="Scene">
|
||||||
<node id="Plane" name="Plane" type="NODE">
|
<node id="Plane" name="Plane" type="NODE">
|
||||||
<matrix sid="transform">0.3270299 0 0 0 0 0.333 0 -4.76837e-7 0 0 1 0 0 0 0 1</matrix>
|
<matrix sid="transform">0.4856636 0 0 0 0 0.6802911 0 -4.76837e-7 0 0 1 0 0 0 0 1</matrix>
|
||||||
<instance_geometry url="#Plane_004-mesh" name="Plane">
|
<instance_geometry url="#Plane_004-mesh" name="Plane">
|
||||||
<bind_material>
|
<bind_material>
|
||||||
<technique_common>
|
<technique_common>
|
||||||
|
|||||||
Reference in New Issue
Block a user