x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How can I set up Arcade-like physics with ACharacter?

hey all! sorry if it's a dumb question it's my first time with an engine and unreal is just... giant O_O

I am trying to make a danmaku (or bullet hell or insane shoot them up... as you want) like gigawing or The Tale of ALLTYNEX, ikaruga.... so i need movement without any inertia or any physics i want something like "when i push an axis the ship must go to his max speed and when I immediatly it it must stop"

(for information "APhazonmkx" is my player and inherit from "ACharacter")

I've made the "instant stop" with GetMovementComponent()->StopMovementImmediately() inside the axis callback but if there is a solution to just disable inertia (in acceleration AND deceleration) it shoud be better

Now there is remaining problems that I don't understand how to fix:

-the first: it's a space ship so it must fly ! and apparently by default ACharacter's inherited object fall I've try to set values from CharacterMovement inside "APhazonmkx" constructor but most of time nothing happen... I've already try to set project's gravity to 0 (according to an other question poster here) but this solution is ugly and i will need gravity -the second: because of inertia the ship is slow to accelerate (with CharacterMovement->AirControl = 1 inside the constructor of "APhazonmkx" it's acceptable but I don't know if it's the goodway to do this)

-the third: i've already achieve it with blueprint but for a lot of reason I want to to this in C++ only

last thing: because it's apparently difficult to code what I want I suspect to inherit from ACharacter was a bad idea for my case so am I in wrong way ?

PS: sorry for my bad english, i'm french

Product Version: Not Selected
Tags:
more ▼

asked Jun 14 '14 at 05:27 PM in C++ Programming

avatar image

NeWincpp
16 2 9 15

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Because you want no acceleration, and an arcade spaceship moves so differently from a biped (which is what Character is designed for), I would recommend extending from Actor instead of Pawn or Character.

Here's what I would do. Make your Spaceship class extend from Actor. Then, have your Controller class spawn your Spaceship class in BeginPlay(). Save a reference to it in your Controller class when you spawn it. From there, you can manually specify any movement by using SetActorLocation() through your input events in the Controller. No unwanted built-in physics, no excessive unnecessary code that comes along with Pawn and Character, only what you need.

more ▼

answered Jun 14 '14 at 11:28 PM

avatar image

James Ordner
382 16 17 25

avatar image NeWincpp Jun 16 '14 at 02:34 PM

thanks for all these advice ! btw because of simplicity for now i've only replace inheritance from Character to Pawn (my code is now inspired from fly template for the constructor) and with SetActorLocation() (thanks for this function !) the movement is configurable as I want and move as I want (but I keep in mind extending from Actor insteas of Pawn as you say but before that I want to check the adventages of a Pawn in term of simplicity)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question