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 to replace core engine files in plugin

This is my first time dealing with a large C++ project and it's a pretty big step up. My problem is that I want to change the movement so that it works like the source engine and bunnyhopping and surfing is possible. So I located the file responsible (as far as I could work out) for updating movement of characters (characterMovementComponent.cpp/.h). However when I tried to change it directly it wouldn't update. So I decided the best thing to do would be to create a plugin that changes the movement whenever it's activated.

My question is, is this the correct way to go about this and how can i overwrite the characterMovementComponent.cpp with my own one from a plugin? (or if this is even possible, I'm new to large engines)

Any help would be appreciated, thanks.

Product Version: UE 4.9
more ▼

asked Oct 20 '15 at 02:34 AM in C++ Programming

avatar image

3 1 2 5

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

1 answer: sort voted first

No, C++ code that is compiled and loaded and other code is linked in to it can't be overwritted (in C++ sofcorse ince you can technicly edit compiled binery files). But you can create subclass of UCharacterMovementComponent and override it's functionality by overrideing it's functions. Ofcorse it will create sperate component but you can still use it. Run editor and make new C++ class in File menu, there you can pick base class and pick CharacterMovementComponent. It's kind of wierd you don't know about it since it's basics of codeing in this engine.

Here you got tutorial i made about classes and objects in UE4, about inherence, it mainly directed for BP users but it should help you grasp how to deal with classes, note that BP classes are same valid classes as C++ classes https://www.youtube.com/watch?v=R9QIIBB_qVc

Also worth mention is that engine is divided in to modules (similary to Linux kernel, you can see modules in binery directory, all those dlls), when you make C++ project it creates extra module and it equile to all other modules in engine, techniclly you extending engine code, Plugin also contains modules. They work the same and they can do anything as any other module can, they are just diffrent way of distributing them, so lot of things can be done without editing a single line in engine.

more ▼

answered Oct 20 '15 at 03:40 AM

avatar image

36.6k 932 169 1111

(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