kandi background
Explore Kits

Space-Fighter | A 2D game for android platform

 by   praharsh Java Version: v1.0 License: MIT License

 by   praharsh Java Version: v1.0 License: MIT License

Download this library from

kandi X-RAY | Space-Fighter Summary

Space-Fighter is a Java library. Space-Fighter has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. However Space-Fighter build file is not available. You can download it from GitLab.
A 2D game for android platform.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • Space-Fighter has a low active ecosystem.
  • It has 0 star(s) with 0 fork(s). There are no watchers for this library.
  • It had no major release in the last 12 months.
  • Space-Fighter has no issues reported. There are no pull requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of Space-Fighter is v1.0
Space-Fighter Support
Best in #Java
Average in #Java
Space-Fighter Support
Best in #Java
Average in #Java

quality kandi Quality

  • Space-Fighter has no bugs reported.
Space-Fighter Quality
Best in #Java
Average in #Java
Space-Fighter Quality
Best in #Java
Average in #Java

securitySecurity

  • Space-Fighter has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
Space-Fighter Security
Best in #Java
Average in #Java
Space-Fighter Security
Best in #Java
Average in #Java

license License

  • Space-Fighter is licensed under the MIT License License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
Space-Fighter License
Best in #Java
Average in #Java
Space-Fighter License
Best in #Java
Average in #Java

buildReuse

  • Space-Fighter releases are available to install and integrate.
  • Space-Fighter has no build file. You will be need to create the build yourself to build the component from source.
Space-Fighter Reuse
Best in #Java
Average in #Java
Space-Fighter Reuse
Best in #Java
Average in #Java
Top functions reviewed by kandi - BETA

kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample Here

Get all kandi verified functions for this library.

Get all kandi verified functions for this library.

Space-Fighter Key Features

A 2D game for android platform.

default

copy iconCopydownload iconDownload
Download apk from [Releases](https://github.com/praharshjain/Space-Fighter/releases)

Or open project with Android Studio and build from source

Screenshot

Have camera follow player -object position and rotation in 3D-space (Unity3d)

copy iconCopydownload iconDownload
transform.position = Target.transform.position;
transform.position -= currentRotation * Vector3.forward * Distance;

Vector3 currentUp = currentRotation * Vector3.up;
transform.LookAt(Target.transform, currentUp);
transform.position += currentUp * Height;

Community Discussions

Trending Discussions on Space-Fighter
  • Have camera follow player -object position and rotation in 3D-space (Unity3d)
Trending Discussions on Space-Fighter

QUESTION

Have camera follow player -object position and rotation in 3D-space (Unity3d)

Asked 2020-Jan-07 at 15:35

My objective here is to have a smoothed out "follow camera", for my space-fighter proof of concept game. The camera should match roll off the target object in all axis.

To that end I've "stolen" and modified this code from the unity Answers-site, and it works beautifully for X and Y (pitch and yaw), but it refuses to roll.

Code:

public float Distance;
public float Height;
public float RotationDamping;
public GameObject Target;

void LateUpdate()
{
    var wantedRotationAngleYaw = Target.transform.eulerAngles.y;
    var currentRotationAngleYaw = transform.eulerAngles.y;

    var wantedRotationAnglePitch = Target.transform.eulerAngles.x;
    var currentRotationAnglePitch = transform.eulerAngles.x;

    var wantedRotationAngleRoll = Target.transform.eulerAngles.z;
    var currentRotationAngleRoll = transform.eulerAngles.z;

    currentRotationAngleYaw = Mathf.LerpAngle(currentRotationAngleYaw, wantedRotationAngleYaw, RotationDamping * Time.deltaTime);

    currentRotationAnglePitch = Mathf.LerpAngle(currentRotationAnglePitch, wantedRotationAnglePitch, RotationDamping * Time.deltaTime);

    currentRotationAngleRoll = Mathf.LerpAngle(currentRotationAngleRoll, wantedRotationAngleRoll, RotationDamping * Time.deltaTime);

    var currentRotation = Quaternion.Euler(currentRotationAnglePitch, currentRotationAngleYaw, currentRotationAngleRoll);

    transform.position = Target.transform.position;
    transform.position -= currentRotation * Vector3.forward * Distance;

    transform.LookAt(Target.transform);
    transform.position += transform.up * Height;
}

Image:

enter image description here

ANSWER

Answered 2020-Jan-07 at 15:35

I would be more certain about this answer if you explained what you were trying to do, but you should consider moving by Height in the direction of currentRotation * Vector3.up instead of transform.up. Also, consider using currentRotation * Vector3.up to set the local up direction when calling LookAt:

transform.position = Target.transform.position;
transform.position -= currentRotation * Vector3.forward * Distance;

Vector3 currentUp = currentRotation * Vector3.up;
transform.LookAt(Target.transform, currentUp);
transform.position += currentUp * Height;

Source https://stackoverflow.com/questions/59588279

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install Space-Fighter

You can download it from GitLab.
You can use Space-Fighter like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the Space-Fighter component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

Support

For any new features, suggestions and bugs create an issue on GitLab. If you have any questions check and ask questions on community page Stack Overflow .

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases
Explore Kits

Save this library and start creating your kit

Share this Page

share link
Reuse Pre-built Kits with Space-Fighter
Consider Popular Java Libraries
Try Top Libraries by praharsh
Compare Java Libraries with Highest Support
Compare Java Libraries with Highest Quality
Compare Java Libraries with Highest Security
Compare Java Libraries with Permissive License
Compare Java Libraries with Highest Reuse
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases
Explore Kits

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.